<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<ul  Id="city">
</ul>

<script type="text/javascript">
  var citylist=["北京","上海","广州","深圳"];
  for(var i in citylist)
{
  var text =citylist[i];
  var tag = document.createElement("li");
  tag.innerHTML = text;
var parentTag = document.getElementById("city");
  parentTag.appendChild(tag);
}
</script>
</body>
</html>